package com.hsmw.schedule.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hsmw.common.base.BaseService;
import com.hsmw.domain.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import com.hsmw.schedule.mapper.HsmwItemMapper;

@Service
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public class HsmwItemService extends BaseService<HsmwItemMapper, HsmwItem> {

	@Autowired
	private HsmwItemMapper hsmwItemMapper;

	public HsmwItem getHsmwItemById(String id) {
		LambdaQueryWrapper<HsmwItem> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(HsmwItem::getId, id);
		return hsmwItemMapper.selectOne(queryWrapper);
	}

}
